home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #1 / Amiga Plus CD - 2000 - No. 1.iso / Tools / Dev / GBE_SRC / rom.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-11-12  |  2.3 KB  |  63 lines

  1. /*
  2.  *  gbe - gameboy emulator
  3.  *  Copyright (C) 1999  Chuck Mason, Steven Fuller
  4.  *
  5.  *  This program is free software; you can redistribute it and/or modify
  6.  *  it under the terms of the GNU General Public License as published by
  7.  *  the Free Software Foundation; either version 2 of the License, or
  8.  *  (at your option) any later version.
  9.  *
  10.  *  This program is distributed in the hope that it will be useful,
  11.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.  *  GNU General Public License for more details.
  14.  *
  15.  *  You should have received a copy of the GNU General Public License
  16.  *  along with this program; if not, write to the Free Software
  17.  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  18.  *
  19.  *
  20.  *  Chuck Mason <chuckjr@sinclair.net>
  21.  *  Steven Fuller <relnev@atdot.org>
  22.  */
  23. #ifndef __ROM_H
  24. #define __ROM_H
  25.  
  26.  
  27. typedef enum _cartsize { SIZE_Unknown = 0, SIZE_32k, SIZE_64k, SIZE_128k, SIZE_256k, SIZE_512k, SIZE_1M, SIZE_2M } cartsize;
  28. typedef enum _carttype { TYPE_Unknown = 0, 
  29.                          TYPE_ROM_Only, 
  30.                          TYPE_ROM_MBC1, 
  31.                          TYPE_ROM_MBC1_RAM,
  32.                          TYPE_ROM_MBC1_RAM_BATTERY,
  33.                          TYPE_ROM_MBC2,
  34.                          TYPE_ROM_MBC2_BATTERY,
  35.                          TYPE_ROM_MBC3,
  36.                          TYPE_ROM_MBC3_RAM,
  37.                          TYPE_ROM_MBC3_RAM_BATTERY,
  38.                          TYPE_ROM_MBC5,
  39.                          TYPE_ROM_MBC5_RAM,
  40.                          TYPE_ROM_MBC5_RAM_BATTERY } carttype;
  41. typedef enum _mbc1type { MBC1_Unused  = 0, MBC1_16M_8K, MBC1_4M_32K } mbc1type;
  42. typedef enum _ramsize  { RAM_SIZE_2KB = 1, RAM_SIZE_8KB, RAM_SIZE_32KB, RAM_SIZE_128KB } ramsize;
  43.  
  44. extern unsigned char  color_gameboy;
  45. extern cartsize       cartridge_size;
  46. extern carttype       cartridge_type;
  47. extern unsigned char *cartridge_rom;
  48. extern mbc1type       cartridge_mbc1;
  49. extern unsigned char *cartridge_ram;
  50. extern ramsize        cartridge_ramsize;
  51.  
  52. int load_rom(char *);
  53. void free_rom();
  54. void install_rom();
  55. void install_ram();
  56. void rom_select_bank(int, int);
  57. void rom_select_ram_bank(int);
  58. void rom_create_sav_path(char *);
  59. void rom_save_ram();
  60. void rom_load_ram();
  61.  
  62. #endif
  63.